package pojo;


import java.time.LocalDateTime;

public class Songs {
    // 歌曲ID (主键)
    private int songId;

    // 歌曲标题
    private String title;

    // 歌曲文件路径
    private String filePath;

    // 歌曲简介
    private String description;

    // 上传者ID，关联到Users表
    private int uploaderId;

    // 歌曲分类ID，关联到Categories表
    private int categoryId;

    // 上传日期
    private LocalDateTime uploadDate;

    // 构造函数
    public Songs() {
    }

    public Songs(int songId, String title, String filePath, String description, int uploaderId, int categoryId, LocalDateTime uploadDate) {
        this.songId = songId;   
        this.title = title;
        this.filePath = filePath;
        this.description = description;
        this.uploaderId = uploaderId;
        this.categoryId = categoryId;
        this.uploadDate = uploadDate;
    }

    public Songs(int songId, String title, String filePath, String description, int uploaderId, int categoryId) {
        this.songId = songId;
        this.title = title;
        this.filePath = filePath;
        this.description = description;
        this.uploaderId = uploaderId;
        this.categoryId = categoryId;
    }
    public Songs(String title, String filePath, String description, int uploaderId, int categoryId) {
        this.title = title;
        this.filePath = filePath;
        this.description = description;
        this.uploaderId = uploaderId;
        this.categoryId = categoryId;
    }
    // Getter和Setter方法
    public int getSongId() {
        return songId;
    }

    public void setSongId(int songId) {
        this.songId = songId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getUploaderId() {
        return uploaderId;
    }

    public void setUploaderId(int uploaderId) {
        this.uploaderId = uploaderId;
    }

    public int getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(int categoryId) {
        this.categoryId = categoryId;
    }

    public LocalDateTime getUploadDate() {
        return uploadDate;
    }

    public void setUploadDate(LocalDateTime uploadDate) {
        this.uploadDate = uploadDate;
    }

    // toString方法
    @Override
    public String toString() {
        return "Songs{" +
                "songId=" + songId +
                ", title='" + title + '\'' +
                ", filePath='" + filePath + '\'' +
                ", description='" + description + '\'' +
                ", uploaderId=" + uploaderId +
                ", categoryId=" + categoryId +
                ", uploadDate=" + uploadDate +
                '}';
    }
}
